﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IDAL
{
    public interface IBaseDAL<T>
    {
        //侯海啸
        void Add(T model);
        List<T> GetAll();
        void Delete(int id);
        void Delete(T model);
        void Update(T model);
        T GetOne(int id);
        List<T> Search(Func<T, bool> where);
        List<T> Search(int pageSize, int pageIndex,bool isDesc,Func<T, bool> where);
        int GetCount(Func<T, bool> where);
        int SaveChange();
        DbContextTransaction BeginTran();
    }
}
